export default function downloadPhoto(url: string) {
  fetch(url, {
    headers: new Headers({
      Origin: location.origin,
    }),
    mode: "cors",
  })
    .then((response) => response.blob())
    .then((blob) => {
      return window.URL.createObjectURL(blob);
    })
    .catch((e) => console.error(e));
}
